package com.remoter.basic.provider;

import java.io.Closeable;

import com.remoter.basic.bean.support.ProviderModule;
import com.remoter.basic.bean.support.RemoterRequest;
import com.remoter.basic.task.ITask;
import com.remoter.basic.task.ITaskCallBack;
import com.remoter.basic.transport.IServer;
import com.remoter.basic.util.ServiceLoader.SPI;

/**
 * @author			koko
 * @date 			2017-08-08 13:17:16
 * @description 	类功能说明
 */
@SPI
public interface IProvider extends Closeable{
	
	public void bind(ProviderModule providerModule)throws Exception;
	public void unBind(ProviderModule providerModule)throws Exception;
	public void submit(ITask task,ITaskCallBack taskCallBack);
	public IServer getServer(ProviderModule providerModule,boolean autoBind)throws Exception;
	public ProviderModule getProviderModule(RemoterRequest remoterRequest);
	
}